//
//  HOMNSArrayForEachTests.m
//  HigherOrderMessaging
//
//  Created by Ofri Wolfus on 23/11/06.
//  Copyright 2006 Ofri Wolfus. All rights reserved.
//

#import "HOMNSArrayForEachTests.h"


@implementation HOMNSArrayForEachTests

- (id)testForEach {
	NSMutableArray *a = [NSMutableArray array];
	NSArray *collection = smallArray;
	
	foreach(NSString *str In smallArray)
		[a addObject:str];
	
	return a;
}

- (BOOL)verifyTestForEach:(NSArray *)r {
	return [r isEqualToArray:smallArray];
}

- (id)testForEach_Break {
	NSMutableArray *a = [NSMutableArray array];
	NSArray *collection = smallArray;
	
	foreach(NSString *str, smallArray) {
		[a addObject:str];
		break;
	}
	
	return a;
}

- (BOOL)verifyTestForEach_Break:(NSArray *)r {
	return [r isEqualToArray:[NSArray arrayWithObject:@"a"]];
}

@end
